<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>操作员设置</title>
    <link rel="stylesheet" href="http://static-online.zhaogangtest.com/publicresource/css/bootstrap-table.css">
    <link rel="stylesheet" href="../../../resources/public/css/bootstrap-table-fixed-columns.css">
    <link rel="stylesheet" href="http://static-online.zhaogangtest.com/publicresource/control/daterangpicker/daterangepicker-bs3.css">
    <link rel="stylesheet" href="../../../resources/public/css/table.css">
    <link rel="stylesheet" href="../../../resources/public/css/iconfont.min.css">
    <link rel="stylesheet" href="../../../resources/public/css/scmstrap.css">
</head>

<body>
    <div class="main">
        <!-- 条件区域 -->
        <div class="form-list">
            <div class="group">
                <label>用户名称</label>
                <div class="scm-input-wrap">
                    <input type="text" class="scm-input">
                </div>
            </div>
            <div class="group">
                <label>账号</label>
                <div class="scm-input-wrap">
                    <input type="text" class="scm-input">
                </div>
            </div>
            <div class="group group-select">
                <label>所属部门</label>
                <div class="selectshow selectshowAction scm-input-wrap">
                    <input type="text" class="scm-input hand" readonly="" placeholder="全部">
                </div>
                <ul class="select" style="display: none;">
                    <li>全部</li>
                    <li>未结单</li>
                    <li>已结单</li>
                </ul>
            </div>
            <div class="group group-select">
                <label>员工</label>
                <div class="selectshow selectshowAction scm-input-wrap">
                    <input type="text" class="scm-input hand" readonly="" placeholder="全部">
                </div>
                <ul class="select" style="display: none;">
                    <li>全部</li>
                    <li>未结单</li>
                    <li>已结单</li>
                </ul>
            </div>
        </div>
        <!-- 按钮 -->
        <div class="operation">
            <div class="conditionbtn">
                <button class="scm-btn blue">
                    <i class="anticon icon-search1"></i>查询</button>
                <button class="scm-btn">
                    <i class="anticon icon-retweet"></i>重置</button>
            </div>
            <div class="scm-btn-group fr">
                <button class="scm-btn btn-add-item">
                    <i class="anticon icon-plus"></i>添加
                </button>
                <button class="scm-btn btn-adjust-item">
                    <i class="anticon icon-edit1"></i>修改
                </button>
            </div>
        </div>
        <div class="box-table">
            <table class="table table-condensed" id="table-parent"></table>
        </div>
    </div>
    
       <!-- 添加 -->
    <div class="layer-add-item" style="display: none;">
        <div class="main">
            <!-- 条件区域 -->
            <div class="form-list form-list-btn-inner nofloat">
                <div class="group group-select group-double-column-style">
                    <label><b class="must">*</b>所属部门</label>
                    <div class="selectshow selectshowAction scm-input-wrap">
                        <input type="text" class="scm-input hand" readonly="" placeholder="销售部">
                    </div>
                    <ul class="select" style="display: none;">
                        <li>上海钢富信息科技有限公司上海钢富信息科技有限公司</li>
                        <li>上海钢找塑料</li>
                        <li>上海找油网信息科技</li>
                    </ul>
                </div>
                <div class="group group-select group-double-column-style">
                    <label><b class="must">*</b>员工</label>
                    <div class="selectshow selectshowAction scm-input-wrap">
                        <input type="text" class="scm-input hand" readonly="" placeholder="理计">
                    </div>
                    <ul class="select" style="display: none;">
                        <li>上海钢富信息科技有限公司上海钢富信息科技有限公司</li>
                        <li>上海钢找塑料</li>
                        <li>上海找油网信息科技</li>
                    </ul>
                </div>
                <div class="group group-double-column-style ">
                    <label><b class="must">*</b>昵称</label>
                    <div class="scm-input-wrap">
                        <input type="text" class="scm-input">
                    </div>
                </div>
                <div class="group group-double-column-style ">
                    <label>用户名称</label>
                    <div class="scm-input-wrap">
                        <input type="text" disabled="disabled" class="scm-input scm-input-read" value="用户名称"> 
                    </div>
                </div>
                <div class="group group-double-column-style ">
                    <label><b class="must">*</b>账号</label>
                    <div class="scm-input-wrap">
                        <input type="text" class="scm-input">
                    </div>
                </div>
                <div class="group group-double-column-style ">
                    <label>密码</label>
                    <div class="scm-input-wrap">
                        <input type="text" class="scm-input">
                    </div>
                </div>
                <div class="group group-select group-double-column-style">
                    <label><b class="must">*</b>所属机构</label>
                    <div class="selectshow selectshowAction scm-input-wrap">
                        <input type="text" class="scm-input hand" readonly="" placeholder="长达钢铁">
                    </div>
                    <ul class="select" style="display: none;">
                        <li>上海钢富信息科技有限公司上海钢富信息科技有限公司</li>
                        <li>上海钢找塑料</li>
                        <li>上海找油网信息科技</li>
                    </ul>
                </div>
                <div class="group group-double-column-style">
                    <label>状态</label>
                    <div class="scm-input-wrap mycheckradioall">
                        <label class="mycheckradio radio-popup-style"><em></em>禁用</label>
                        <label class="mycheckradio radio-popup-style  active"><em></em>启用</label>
                    </div>
                </div>
                <div class="group double-column-input-style popup-multiple-checkbox-style">
                    <label>选择角色</label>
                    <div class="scm-input-wrap">
                        <label class="mycheckbox "><em></em>管理员</label>
                        <label class="mycheckbox "><em></em>材质</label>
                        <label class="mycheckbox "><em></em>标准</label>
                        <label class="mycheckbox "><em></em>规格</label>
                        <label class="mycheckbox "><em></em>品质</label>
                        <label class="mycheckbox "><em></em>计量方式</label>
                        <label class="mycheckbox "><em></em>交货状态</label>
                        <label class="mycheckbox "><em></em>厚度</label>
                        <label class="mycheckbox "><em></em>宽度</label>
                        <label class="mycheckbox "><em></em>长度</label>
                        <label class="mycheckbox "><em></em>是否定尺</label>
                        <label class="mycheckbox "><em></em>件支数</label>
                        <label class="mycheckbox "><em></em>产品类型</label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 修改 -->
    <div class="layer-adjust-item" style="display: none;">
        <div class="main">
            <!-- 条件区域 -->
            <div class="form-list form-list-btn-inner nofloat">
                <div class="group group-select group-double-column-style">
                    <label><b class="must">*</b>所属部门</label>
                    <div class="selectshow selectshowAction scm-input-wrap">
                        <input type="text" disabled="disabled" class="scm-input hand scm-input-read" readonly="" placeholder="销售部">
                    </div>
                    <ul class="select" style="display: none;">
                        <li>上海钢富信息科技有限公司上海钢富信息科技有限公司</li>
                        <li>上海钢找塑料</li>
                        <li>上海找油网信息科技</li>
                    </ul>
                </div>
                <div class="group group-select group-double-column-style">
                    <label><b class="must">*</b>员工</label>
                    <div class="selectshow selectshowAction scm-input-wrap">
                        <input type="text" class="scm-input hand" readonly="" placeholder="理计">
                    </div>
                    <ul class="select" style="display: none;">
                        <li>上海钢富信息科技有限公司上海钢富信息科技有限公司</li>
                        <li>上海钢找塑料</li>
                        <li>上海找油网信息科技</li>
                    </ul>
                </div>
                <div class="group group-double-column-style ">
                    <label><b class="must">*</b>昵称</label>
                    <div class="scm-input-wrap">
                        <input type="text" class="scm-input" value="管理员">
                    </div>
                </div>
                <div class="group group-double-column-style ">
                    <label>用户名称</label>
                    <div class="scm-input-wrap">
                        <input type="text" disabled="disabled" class="scm-input scm-input-read" value="用户名称"> 
                    </div>
                </div>
                <div class="group group-double-column-style ">
                    <label><b class="must">*</b>账号</label>
                    <div class="scm-input-wrap">
                        <input type="text" class="scm-input" value="admin">
                    </div>
                </div>
                <div class="group group-double-column-style ">
                    <label>密码</label>
                    <div class="scm-input-wrap">
                        <input type="text" class="scm-input">
                    </div>
                </div>
                <div class="group group-select group-double-column-style">
                    <label><b class="must">*</b>所属机构</label>
                    <div class="selectshow selectshowAction scm-input-wrap">
                        <input type="text" class="scm-input hand" readonly="" placeholder="长达钢铁">
                    </div>
                    <ul class="select" style="display: none;">
                        <li>上海钢富信息科技有限公司上海钢富信息科技有限公司</li>
                        <li>上海钢找塑料</li>
                        <li>上海找油网信息科技</li>
                    </ul>
                </div>
                <div class="group group-double-column-style">
                    <label>状态</label>
                    <div class="scm-input-wrap mycheckradioall">
                        <label class="mycheckradio radio-popup-style"><em></em>禁用</label>
                        <label class="mycheckradio radio-popup-style  active"><em></em>启用</label>
                    </div>
                </div>
                <div class="group double-column-input-style popup-multiple-checkbox-style">
                    <label>选择角色</label>
                    <div class="scm-input-wrap">
                        <label class="mycheckbox "><em></em>管理员</label>
                        <label class="mycheckbox "><em></em>材质</label>
                        <label class="mycheckbox "><em></em>标准</label>
                        <label class="mycheckbox "><em></em>规格</label>
                        <label class="mycheckbox "><em></em>品质</label>
                        <label class="mycheckbox "><em></em>计量方式</label>
                        <label class="mycheckbox "><em></em>交货状态</label>
                        <label class="mycheckbox "><em></em>厚度</label>
                        <label class="mycheckbox "><em></em>宽度</label>
                        <label class="mycheckbox "><em></em>长度</label>
                        <label class="mycheckbox "><em></em>是否定尺</label>
                        <label class="mycheckbox "><em></em>件支数</label>
                        <label class="mycheckbox "><em></em>产品类型</label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="http://static-online.zhaogangtest.com/publicresource/js/require.js"></script>
    <script>
    var page;

    require.config({
        paths: {
            "jquery": "../../../resources/public/js/jquery.min",
            "bootstrap": 'http://static-online.zhaogangtest.com/publicresource/js/bootstrap.min',
            // "bootstrap-table": "http://static-online.zhaogangtest.com/publicresource/js/bootstrap-table",
            "bootstrap-table": "../../../resources/public/js/bootstrap-table",
            "moment": "http://static-online.zhaogangtest.com/publicresource/control/daterangpicker/moment.min",
            "daterangepicker": "../../../resources/public/js/daterangepicker",

            "layer": 'http://static-online.zhaogangtest.com/publicresource/control/layer/layer.min',
            "public": "../../../resources/public/js/public",
            "chinese": "../../../resources/public/js/chinese",
            "bootstrap-table-fixed": "../../../resources/public/js/bootstrap-table-fixed-columns",
            "autocomplete": "../../../resources/public/js/jquery.autocomplete",
        },
        shim: {
            "jquery": {
                exports: ['jQuery', '$']
            },
            "bootstrap": {
                deps: ["jquery"]
            },
            "bootstrap-table": {
                deps: ["jquery", "bootstrap"]
            },
            "bootstrap-table-fixed": {
                deps: ["bootstrap-table"]
            },
            "layer": {
                deps: ["jquery"],
                exports: "layer"
            },
            "autocomplete": {
                deps: ['jquery']
            },
            "moment": {
                deps: ['jquery']
            },
            "daterangepicker": {
                deps: ["jquery", "moment"],
                exports: "daterangepicker"
            },
            "chinese": {
                deps: ["jquery", "bootstrap-table"],
            },

            "public": {
                deps: ["jquery", "bootstrap-table", "moment", "daterangepicker"]
            }
        }
    });
    require(["autocomplete", "public", "layer", "chinese", "bootstrap-table-fixed"], function() {
        layer.config({
            path: 'http://static-online.zhaogangtest.com/publicresource/control/layer/'
        });
        $(function() {
            page = {
                init: function() {
                    this.bootstrapTable();
                    this.autocomplete();
                    this.fn_layer();

                    var that = this;
                    $(window).resize(function() {
                        $('#table-parent').bootstrapTable('resetView', {
                            height: that.getHeight()
                        });
                        $('.daterangepicker').hide()
                    });
                    $.daterangepicker("#datepicker", {
                        singleDatePicker: false,
                    });

                },
                bootstrapTable: function() {
                    $('#table-parent').bootstrapTable({
                        pagination: true, //在表格底部显示分页工具栏
                        pageSize: 50,
                        pageNumber: 1,
                        pageList: [10, 25, 50, 100],
                        height: page.getHeight(),
                        showFooter: true,
                        showColumns: false,
                        showRefresh: false,
                        //                    showToggle:true,
                        search: false,
                        //                    showPaginationSwitch:true,
                        //    detailView: true,
                        //   detailFormatter: page.showdetail,
                        // detailFormatter: this.showChild,
                        // onExpandRow: this.expandRow,
                        // onCollapseRow: this.collapseRow,
                        locales: 'zh-CN',
                        fixedColumns: false,
                        fixedNumber: 1,
                        url: '../data/erp/tablelist-operator-setting.json',
                        sidePagination: "server", //分页方式：client客户端分页，server服务端分页（*）

                        columns: [{
                            "field": "n1",
                            "title": "员工",
                        }, {
                            "field": "n2",
                            "title": "用户名称",
                        }, {
                            "field": "n3",
                            "title": "昵称",
                        }, {
                            "field": "n4",
                            "title": "账号",
                        }, {
                            "field": "n5",
                            "title": "所属部门",

                        }, {
                            "field": "n6",
                            "title": "状态",
                        }]
                    });
                },

                fn_layer: function() {
                    $(document).on('click', '.btn-add-item', function() {
                        layer.open({
                            type: 1, //page层
                            area: ['600px', 'auto'],
                            title: '添加',
                            shadeClose: false,
                            btn: ['确定', '取消'],
                            shade: 0.01, //遮罩透明度
                            moveType: 1, //拖拽风格，0是默认，1是传统拖动
                            shift: -1, //0-6的动画形式，-1不开启
                            content: $('.layer-add-item'),
                            skin: "skin-searchMore skin-overflow",
                            yes: function() {}
                        });
                    })
                    $(document).on('click', '.btn-adjust-item', function() {
                        layer.open({
                            type: 1, //page层
                            area: ['600px', 'auto'],
                            title: '修改',
                            shadeClose: false,
                            btn: ['确定', '取消'],
                            shade: 0.01, //遮罩透明度
                            moveType: 1, //拖拽风格，0是默认，1是传统拖动
                            shift: -1, //0-6的动画形式，-1不开启
                            content: $('.layer-adjust-item'),
                            skin: "skin-searchMore skin-overflow",
                            yes: function() {}
                        });
                    })
                },


                autocomplete: function() {
                    var data = ['上海钢找塑料', '上海钢富信息科技有限技有限公司', '上海找油网信息科技', '上海长城实业有限公司',
                        '上海找油网信息科技', '上海长城实业有限公司'
                    ]
                    $("#company input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company1 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap1',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company2 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap2',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company3 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap3',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company4 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap4',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company5 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap5',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                },
                // 表格高度
                getHeight: function() {
                    var _height = $('.form-list').outerHeight(
                        true) + $('.operation').outerHeight(true)
                    return $(window).height() - _height - 20;
                },
            }
            page.init();
        })
    })
    </script>
</body>

</html>